<?php
/** 
 * Example defaukt actions
 * This is an simple example to implement an actiongroups
 * It shows how to send display vars to a template.
 *
 * @author Patrice Ferlet <metal3d@copix.org> 
 * @package modules.default
 * @license http://opensource.org/licenses/lgpl-3.0.html GNU Lesser General Public License Version 3.0 (LGPLv3)
*/
class defaultActions extends PActions {

    public function processDefault(){
            /*/
            $db = PDB::instance();
            $res = $db->doQuery("select * from mytest");
            $res = $db->doQuery("select * from mytest");
            

            var_dump($res[0]);
            /*/
            //$dao = _dao('mytest');
            //$res = $dao->get('2');
            //var_dump($res[0]->name);
            /**/

            /*$rec = _record('mytest');
            $rec->name="test";
            $rec->insert();
            */

            $tpl = new PTemplate();
            $tpl->test = "Content of \$tpl->test var" ;
            return _display(_obj(array(
                'PAGE_TITLE' => 'Testing template system',
                'MAIN' => $tpl->fetch("index.php")
                )));
    }
}
